package com.atguigu.spring.beans.collections;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {

	public static void main(String[] args) {
		ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
		
		Person person = (Person) ctx.getBean("personext3");
		System.out.println(person);

		person = (Person) ctx.getBean("person4");
		System.out.println(person);

		
		NewPerson newPerson = (NewPerson) ctx.getBean("newperson");
		System.out.println(newPerson);
		
		DataSource ds = (DataSource)ctx.getBean("dataSource");
		
		System.out.println(ds.getProperties());
		
		person = (Person) ctx.getBean("person5");
		System.out.println(person);

	}
}
